تابع اصلی:
function ajax(url, callback, error, method, cache, async) { async = async || true; //alert(cache); if (typeof(cache) == 'undefined') { cache = false; } if (typeof(method) == 'undefined') { method = 'GET'; } if (window.XMLHttpRequest) // code for IE7+, Firefox, Chrome, Opera, Safari { xmlhttp = new XMLHttpRequest(); } else // code for IE5, IE6 { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if (xmlhttp.status == 200) { if (typeof(callback) == 'function') { callback(xmlhttp.responseText); } } else { if (typeof(error) == 'function') { error(xmlhttp.status); } else { aler دغدغه های روزانه ، ماهانه وسالانه...
ما را در سایت دغدغه های روزانه ، ماهانه وسالانه دنبال می کنید
برچسب : نویسنده : ashkufarazo بازدید : 1036 تاريخ : جمعه 26 شهريور 1395 ساعت: 20:34